package everydayone.lastmaining;
/**
 * @Date 2020/03/30
 * @author 王光浩
 * @Thinking 使用递归实现
 */
public class MyMethodThree {
	private int helper(int n,int m) {
		if(n<=1)return 0;
		return (helper(n-1,m)+m)%n;
	}
	public int lastRemaining(int n, int m) {
		return helper(n,m);
	}
}
